package zcj.stu;

import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;

public class C32 {
    //Tomcat可以处理最上层的异常 比如过滤器中的异常 spring无能为力
    public static void main(String[] args) {
        AnnotationConfigServletWebServerApplicationContext context = new AnnotationConfigServletWebServerApplicationContext(WebConfig.class);
        RequestMappingHandlerMapping mapping =(RequestMappingHandlerMapping) context.getBean("mapping");
        mapping.getHandlerMethods().forEach((k,v)->{
            System.out.println("映射路径:"+k+" 方法信息:"+v);
        });
    }
}
